#!/usr/bin/node

const mysql = require('mysql2/promise'),
      log = console.log;

let con = mysql.createPool({
  host:'localhost',
  user:'root',
  password:'ddd',
  databases:'test'
});

async function getAreas(){
  const sql = 'select * from areas';
  let [rows] = await con.execute(sql);

  return rows;
  
}

(async function(){
  log(await getAreas());
})();

